<?php
namespace Amis\functions;

use Amis\Basics\AmisBasics;

class Nav extends AmisBasics
{
    public $className;
    public $stacked;
    public $source;
    public $deferApi;
    public $itemActions;
    public $draggable;
    public $dragOnSameLevel;
    public $saveOrderApi;
    public $itemBadge;
    public $links;

    public string $type = 'nav';


    public function className($className)
    {
        $this->className = $className;
        return $this;
    }

    public function stacked(bool $stacked = true)
    {
        $this->stacked = $stacked;
        return $this;
    }

    public function source($source = '')
    {
        $this->source = $source;
        return $this;
    }

    public function deferApi($deferApi = '')
    {
        $this->deferApi = $deferApi;
        return $this;
    }

    public function itemActions(array $itemActions = [])
    {
        $this->itemActions = $itemActions;
        return $this;
    }

    public function draggable(bool $draggable)
    {
        $this->draggable = $draggable;
        return $this;
    }

    public function dragOnSameLevel(bool $dragOnSameLevel)
    {
        $this->dragOnSameLevel = $dragOnSameLevel;
        return $this;
    }

    public function saveOrderApi(string $saveOrderApi)
    {
        $this->saveOrderApi = $saveOrderApi;
        return $this;
    }

    public function itemBadge(array $itemBadge)
    {
        $this->itemBadge = $itemBadge;
        return $this;
    }

    /**
     * @param ...$items
     * @return $this
     */
    public function links(...$items)
    {
        $this->set(__FUNCTION__,...$items);
        return $this;
    }
}